package com.googlecode.publicholiday.service;

import org.joda.time.LocalDate;

import java.util.Collection;

public interface PublicHolidayService {

    /**
     * Create a new Public Holiday for a given Country
     *
     * @param countryCode
     * @param holidayDate
     */
    boolean create(String countryCode, LocalDate holidayDate);

    /**
     * Obtain all the Public Holidays for a given Country between two dates
     *
     * @param countryCode
     * @param startDate start of the date range (inclusive)
     * @param endDate end of the date range (exclusive)
     * @return an empty Iterable<LocalDate> is no Public Holidays are found
     */
    Iterable<LocalDate> find(String countryCode, LocalDate startDate, LocalDate endDate);

    /**
     * Remove a Public Holiday for a given Country
     *
     * @param countryCode
     * @param holidayDate
     */
    boolean delete(String countryCode, LocalDate holidayDate);

    /**
     * Check if the date in question is a Public Holiday in the given Country
     *
     * @param countryCode country to check
     * @param dateInQuestion date to check
     * @return true if the dateInQuestion is a Public Holiday in the given Country
     */
    boolean isPublicHoliday(String countryCode, LocalDate dateInQuestion);
}
